﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Uranus.Common
{
    public class FileHandler
    {

        public static string GetFileExt(string fileName)
        {
            string[] temp = fileName.Split('.');
            return "." + temp[temp.Length - 1].ToLower();
        }

        public static bool CheckType(string fileName, string[] filetype)
        {
            string currentType = GetFileExt(fileName);
            return Array.IndexOf(filetype, currentType) == -1;
        }
    }
}
